﻿@model projectManagementWeb.Models.ProjectLeader.ProjectLeaderAssignResources

@{
    ViewBag.Title = "ProjectLeaderAssignResourcesform";
}

    <p align="right">
            @Html.ActionLink("<< Regresar", "Index")
    </p>

<fieldset>

    <legend>Bienvenido</legend>
    <h1>@User.Identity.Name</h1>

    @{
        
    projectManagementWeb.Controllers.ProjectLeaderController controlLayer = new projectManagementWeb.Controllers.ProjectLeaderController();

    }


</fieldset>

<fieldset>

@using (Html.BeginForm("ProjectLeaderAssignResourcesform", "ProjectLeader", FormMethod.Post))
{
     @Html.ValidationSummary(true)
     <legend>Lista de Recursos</legend>
    using (Html.BeginForm())
    {
    <input type="submit" value="OK" style="visibility:hidden" />
    }


    List<projectManagementWeb.Models.ProjectLeader.ProjectLeaderAssignResources> recursos = @ViewBag.recursos;
    
     <table>
        <tr>
         <td colspan="2"> Nombre del Recurso</td>
        </tr>
        @for (int i = 0; i < recursos.Count; i++)
        {
        <tr>
            <td>
                @recursos[i].FirstName @recursos[i].LastName
            </td>
            <td>
                @using (Html.BeginForm("ProjectLeaderAssignedTasksform", "ProjectLeader", FormMethod.Post))
                {             
                    <input type="hidden" name="userId" value="@(recursos[i].id)"/>
                    <input type="submit" value="Ver Tareas"/>
               }
            </td>
            <td>
            @using (Html.BeginForm("ProjectLeaderAvailableTasksform", "ProjectLeader", FormMethod.Post))
              {             
                    <input type="hidden" name="userId" value="@(recursos[i].id)"/>
                    <input type="submit" value="Asignar Tareas"/>
              }
            </td>
        </tr>
        }
    </table>

}
</fieldset>